home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
nrpas13.zip
/
BESSY0.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-04-29
|
879b
|
23 lines
FUNCTION bessy0(x: real): real;
VAR
xx,z: real; y,ans,ans1,ans2: double;
BEGIN
IF (x < 8.0) THEN BEGIN
y := sqr(x);
ans1 := -2957821389.0+y*(7062834065.0+y*(-512359803.6
+y*(10879881.29+y*(-86327.92757+y*228.4622733))));
ans2 := 40076544269.0+y*(745249964.8+y*(7189466.438
+y*(47447.26470+y*(226.1030244+y*1.0))));
ans := (ans1/ans2)+0.636619772*bessj0(x)*ln(x);
bessy0 := sngl(ans) END
ELSE BEGIN
z := 8.0/x; y := sqr(z); xx := x-0.785398164;
ans1 := 1.0+y*(-0.1098628627e-2+y*(0.2734510407e-4
+y*(-0.2073370639e-5+y*0.2093887211e-6)));
ans2 := -0.1562499995e-1+y*(0.1430488765e-3
+y*(-0.6911147651e-5+y*(0.7621095161e-6+y*(-0.934945152e-7))));
ans := sin(xx)*ans1+z*cos(xx)*ans2;
ans := sqrt(0.636619772/x)*ans;
bessy0 := sngl(ans) END
END;